package com.crm;

import com.myrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

@SpringBootApplication
@EnableEurekaClient //eureka 客户端
//1.在启动指定微服务(springcloud-dept)的时候就能去加载我们自定义Ribbon配置类，从而使配置生效
//2.@RibboClient中的配置类(MySelfRule)不能放在@ComponentScan所扫描的当前包以及子包下
//  启动类在crm包，也就是说要建一个和crm同级别的包 来放MySelfRule.class
@RibbonClient(name = "springcloud-dept",configuration = MySelfRule.class)
public class ConsumerDept80Application {

	public static void main(String[] args) {
		SpringApplication.run(ConsumerDept80Application.class, args);
	}

}
